﻿using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace DFGK_WMS.Context.Migrations
{
    public partial class 修改库存字段 : Migration
    {
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropColumn(
                name: "BusinessType",
                table: "TInventories");

            migrationBuilder.DropColumn(
                name: "DeptCode",
                table: "TInventories");

            migrationBuilder.DropColumn(
                name: "DeptName",
                table: "TInventories");

            migrationBuilder.DropColumn(
                name: "DisOrderLineNo",
                table: "TInventories");

            migrationBuilder.DropColumn(
                name: "DisOrderNo",
                table: "TInventories");

            migrationBuilder.DropColumn(
                name: "PurOrderLineNo",
                table: "TInventories");

            migrationBuilder.DropColumn(
                name: "PurOrderLineType",
                table: "TInventories");

            migrationBuilder.DropColumn(
                name: "PurOrderNo",
                table: "TInventories");

            migrationBuilder.DropColumn(
                name: "RoutewayId",
                table: "TInventories");

            migrationBuilder.AddColumn<string>(
                name: "Contact",
                table: "TReceivingOrderDetails",
                type: "nvarchar(max)",
                nullable: true);

            migrationBuilder.AddColumn<string>(
                name: "ContactMobile",
                table: "TReceivingOrderDetails",
                type: "nvarchar(max)",
                nullable: true);

            migrationBuilder.AddColumn<string>(
                name: "MaterialCategoryCode",
                table: "TReceivingOrderDetails",
                type: "nvarchar(max)",
                nullable: true);

            migrationBuilder.AddColumn<string>(
                name: "SupplierCode",
                table: "TReceivingOrderDetails",
                type: "nvarchar(max)",
                nullable: true);
        }

        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropColumn(
                name: "Contact",
                table: "TReceivingOrderDetails");

            migrationBuilder.DropColumn(
                name: "ContactMobile",
                table: "TReceivingOrderDetails");

            migrationBuilder.DropColumn(
                name: "MaterialCategoryCode",
                table: "TReceivingOrderDetails");

            migrationBuilder.DropColumn(
                name: "SupplierCode",
                table: "TReceivingOrderDetails");

            migrationBuilder.AddColumn<int>(
                name: "BusinessType",
                table: "TInventories",
                type: "int",
                nullable: false,
                defaultValue: 0);

            migrationBuilder.AddColumn<string>(
                name: "DeptCode",
                table: "TInventories",
                type: "nvarchar(max)",
                nullable: true);

            migrationBuilder.AddColumn<string>(
                name: "DeptName",
                table: "TInventories",
                type: "nvarchar(max)",
                nullable: true);

            migrationBuilder.AddColumn<string>(
                name: "DisOrderLineNo",
                table: "TInventories",
                type: "nvarchar(max)",
                nullable: true);

            migrationBuilder.AddColumn<string>(
                name: "DisOrderNo",
                table: "TInventories",
                type: "nvarchar(max)",
                nullable: true);

            migrationBuilder.AddColumn<string>(
                name: "PurOrderLineNo",
                table: "TInventories",
                type: "nvarchar(max)",
                nullable: true);

            migrationBuilder.AddColumn<int>(
                name: "PurOrderLineType",
                table: "TInventories",
                type: "int",
                nullable: true);

            migrationBuilder.AddColumn<string>(
                name: "PurOrderNo",
                table: "TInventories",
                type: "nvarchar(max)",
                nullable: true);

            migrationBuilder.AddColumn<int>(
                name: "RoutewayId",
                table: "TInventories",
                type: "int",
                nullable: true);
        }
    }
}
